<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Yaf_Route_Simple class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="yaf-router.route.html">Yaf_Router::route</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="yaf-assemble-simple.assemble.html">Yaf_Route_Simple::assemble</a></div>
 <div class="up"><a href="book.yaf.html">Yaf</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.yaf-route-simple" class="reference">

 <h1 class="title">The Yaf_Route_Simple class</h1>
 

 <div class="partintro"><p class="verinfo">(Yaf &gt;=1.0.0)</p>


  <div class="section" id="yaf-route-simple.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    <strong class="classname">Yaf_Route_Simple</strong> 会匹配请求中的query string，然后找到路由信息。
   </p>
   <p class="para">
     你需要做的只是告诉 <strong class="classname">Yaf_Route_Simple</strong>，在$_GET中哪个是Module，哪个是Controller，哪个是Action。
   </p>
   <p class="para">
    <span class="methodname"><a href="yaf-route-simple.route.html" class="methodname">Yaf_Route_Simple::route()</a></span> 总是会返回TRUE，所以把<strong class="classname">Yaf_Route_Simple</strong>放在路由堆栈前面是很重要的，否则其他所有的路由都可能不会被调用到。
   </p>
  </div>


  <div class="section" id="yaf-route-simple.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">Yaf_Route_Simple</strong>
     </span>
     
     <span class="oointerface">implements 
      <span class="interfacename"><a href="class.yaf-route-interface.html" class="interfacename">Yaf_Route_Interface</a></span>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yaf-route-simple.html#yaf-route-simple.props.controller">$<var class="varname">controller</var></a></var>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yaf-route-simple.html#yaf-route-simple.props.module">$<var class="varname">module</var></a></var>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yaf-route-simple.html#yaf-route-simple.props.action">$<var class="varname">action</var></a></var>
    ;</div>


    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="yaf-assemble-simple.assemble.html" class="methodname">assemble</a></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$info</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$query</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span><span class="methodname"><a href="yaf-route-simple.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$module_name</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$controller_name</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$action_name</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="yaf-route-simple.route.html" class="methodname">route</a></span>
    ( <span class="methodparam"><span class="type"><a href="class.yaf-request-abstract.html" class="type Yaf_Request_Abstract">Yaf_Request_Abstract</a></span> <code class="parameter">$request</code></span>
   )</div>

   }</div>


  </div>

  

  <div class="section" id="yaf-route-simple.props">
   <h2 class="title">属性</h2>
   <dl>

    
     <dt id="yaf-route-simple.props.controller"><var class="varname"><var class="varname">controller</var></var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
    
     <dt id="yaf-route-simple.props.module"><var class="varname"><var class="varname">module</var></var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
    
     <dt id="yaf-route-simple.props.action"><var class="varname"><var class="varname">action</var></var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
   </dl>

  </div>



 </div>

 






















<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="yaf-assemble-simple.assemble.html">Yaf_Route_Simple::assemble</a> — Assemble a url</li><li><a href="yaf-route-simple.construct.html">Yaf_Route_Simple::__construct</a> — Yaf_Route_Simple constructor</li><li><a href="yaf-route-simple.route.html">Yaf_Route_Simple::route</a> — Route a request</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="yaf-router.route.html">Yaf_Router::route</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="yaf-assemble-simple.assemble.html">Yaf_Route_Simple::assemble</a></div>
 <div class="up"><a href="book.yaf.html">Yaf</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
